﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Automapping.Alterations;
using ADIGRE.Domain;
using FluentNHibernate.Mapping;
using FluentNHibernate.Automapping;

namespace ADIGRE.Infrastructure.NHibernateMaps
{
    public class SaidaMap1 : IAutoMappingOverride<Saida>
    {

        public void Override(AutoMapping<Saida> mapping)
        {
       
            mapping.DiscriminateSubClassesOnColumn(typeof(EnumLancamento).Name).Not.Nullable()
                .SubClass<Pagamento>(m =>
                {
                    m.Map(x => x.NuNota);
                })
                .SubClass<Recibo>(m =>
                {
                    m.References(x => x.Favorecido);
                });
        }

    }
}
